package com.zhiyou100.controller.Logistics;

import com.zhiyou100.dao.Impl.LogisticsDaoImpl;
import com.zhiyou100.emtity.Logistics;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @description:
 * @author: 马跃
 * @create: 2021-01-21 12:55
 **/
@WebServlet("/logisticsQueryAll")
public class LogisticsQueryAllServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        List<Logistics> list = new LogisticsDaoImpl().queryAll();
        request.getSession().setAttribute("list", list);
        request.getRequestDispatcher("./serve/logistics.jsp").forward(request, response);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request, response);
    }
}
